from django.urls import path
from . import views

app_name = 'accounts'

urlpatterns = [
    path('', views.index, name='index'),
    path('register/', views.register, name='register'),
    path('login/', views.user_login, name='login'),
    path('login-without-nav/', views.user_login_without_nav, name='login_without_nav'),
    path('logout/', views.user_logout, name='logout'),
    path('dashboard/', views.dashboard, name='dashboard'),
    path('welcome/', views.welcome, name='welcome'),
    path('sync-permissions/', views.sync_permissions, name='sync_permissions'),
    path('profile/', views.profile, name='profile'),
    
    # 用户管理
    path('users/', views.user_list, name='user_list'),
    path('users/create/', views.user_create, name='user_create'),
    path('users/update/<int:pk>/', views.user_update, name='user_update'),
    path('users/delete/<int:pk>/', views.user_delete, name='user_delete'),
    
    # 角色管理
    path('roles/', views.role_list, name='role_list'),
    path('roles/create/', views.role_create, name='role_create'),
    path('roles/update/<int:pk>/', views.role_update, name='role_update'),
    path('roles/delete/<int:pk>/', views.role_delete, name='role_delete'),
    
    # 菜单管理
    path('menus/', views.menu_list, name='menu_list'),
    path('menus/create/', views.menu_create, name='menu_create'),
    path('menus/update/<int:pk>/', views.menu_update, name='menu_update'),
    path('menus/delete/<int:pk>/', views.menu_delete, name='menu_delete'),
]